import request from '@/utils/request'

export function getGoods(goodsId) {
  return request({
    url: `/api/goods/cloud/${goodsId}?goodsId=${goodsId}`,
    method: 'get'
  })
}

export function getGoodsList(tenantId) {
  return request({
    url: `​/api​/goods​/cloud​/sku-list?tenantId=${tenantId}`,
    method: 'get'
  })
}

export function postGoodsBatchRemove(data) {
  return request({
    url: `/api/goods/cloud/batch-remove`,
    method: 'post',
    data
  })
}

export function postGoodsList(data) {
  return request({
    url: `/api/goods/cloud/list`,
    method: 'post',
    data
  })
}

export function postGoodsCloud(data) {
  return request({
    url: `/api/goods/cloud`,
    method: 'post',
    data
  })
}

export function putGoods(goodsId,data) {
  return request({
    url: `/api/goods/cloud/${goodsId}?goodsId=${goodsId}`,
    method: 'put',
    data
  })
}